package cn.wolfcode.luowowo.common.util;


import cn.wolfcode.luowowo.common.exception.LogicException;

public class AssertUtil {
    public static void hasLength(String str,String msg){
        if (str == null || "".equals(str.trim())){
            throw new LogicException(msg);
        }
    }
    public static void isEquals(String v1,String v2,String msg){
        if (v1 == null || "".equals(v1.trim()) || v2 == null || "".equals(v2.trim())){
            throw new LogicException("参数不能为空");
        }
        if (!v1.equals(v2)){
            throw new LogicException(msg);
        }
    }
}
